package com.dianning.service.imp;

import java.io.IOException;
import java.io.InputStream;
import java.util.*;

import org.apache.commons.logging.*;

import com.dianning.bean.AdSpace;
import com.dianning.bean.Report;
import com.dianning.bean.Visitor;
import com.dianning.dao.AdAdsDAO;
import com.dianning.dao.AdSpaceDAO;
import com.dianning.dao.ReportDAO;
import com.dianning.dao.VisitorDAO;
import com.dianning.exception.DianningException;
import com.dianning.service.AdService;
import com.dianning.service.ReportService;
import com.dianning.service.VisitorService;

public class ReportServiceImp implements ReportService {

	private static final Log logger = LogFactory.getLog(ReportServiceImp.class);
	
	private ReportDAO reportDAO;

	public ReportDAO getReportDAO() {
		return reportDAO;
	}

	public void setReportDAO(ReportDAO reportDAO) {
		this.reportDAO = reportDAO;
	}
	
	/**
	 * 保存Report对象
	 * 
	 * @param report
	 * 			Report对象
	 * @return Report
	 * 			Report对象
	 */
	public Report createReport(Report report){
		return this.getReportDAO().saveOrUpdateReport(report);
	}
	
	/**
	 * 根据主键ID获取Report对象
	 * 
	 * @param id
	 * 			主键ID
	 * @return Report
	 * 			Report对象
	 */
	public Report findReportByReporttypeOid(String reporttype,long oid){
		return this.getReportDAO().findReportByReporttypeOid(reporttype, oid);
	}

}
